// import the super class
importScripts('runnable.min.js', 'utils.js');

// declare the run method, and implement the main logic
onmessage = function(e) {
	var len = e.data,
		html = ['<table><tr><th>Row</th><th>Value</th></tr>'],
		table;
	for (var i = 0; i < len; ++i) {
		html.push('<tr><td>Row #</td><td>');
		html.push(i);
		html.push('</td></tr>');
	}
	html.push('</table>');
	
	table = html.join('');
	
	/*
	var res;
	ajax('get', '../includes/api.php', {action:action}, function(data) {
		res = data;
	});
*/
	// send the response back to the caller
	send(table);
};